<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html class="win-frame">
<head>
 <title>${name_china}管理-查看${name_china}</title>
 <%@include file="/common/head.jsp" %>
 <link href="<%=request.getContextPath()%>/static/plugin/zTree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet">
 <script src="<%=request.getContextPath()%>/static/plugin/zTree/js/jquery.ztree.all-3.5.min.js"></script>
</head>
<body class="iframe-page">
<div class="page-title-wrapper">
    <div class="page-title">
        <div class="page-title-text">
            <span>${name_china}管理</span>
            <span class="split"></span>
            <span>${name_china}详情</span>
        </div>
        <a id="goBack" class="btn-return distance-left" href="javascript:;" onclick="parent.refreshList('${org.code}');"><i class="icon icon-arrow-left"></i>返回上级</a>
    </div>
    <div class="page-title-border"></div>
</div>

<form id="form">
<div class="left-wrap">
   <h3>基本信息</h3>
    <table class="table-view">
        <tr>
	       <td class="td-title">标题</td>
	       <td><span name="name"></span></td>
        </tr>
         <tr>
	       <td class="td-title">副标题</td>
	       <td><span name="content"></span></td>
        </tr>
        
    </table>
    <h3 id="products">精品信息</h3>
    
</div>   
</form>
<script>
   $(function(){
	   var data = ${viewEdit};
	   var products = ${products};
	   
	   $("#form").form().form("loadDataView",{
   		  data : data
   	   });
	   
	   for( var i=0; i<products.length;i++){
    	   var product = products[i];
    	   
    	   $("#products").after('<h4>&nbsp;</h4><table id="product'+i+'" class="table-view">'+
    		        '<tr>'+
    			       '<td class="td-title">高品名称</td>'+
    			       '<td><span>'+product.name+'</span></td>'+
    		        '</tr>'+
	 		       '<tr>'+
	 			       '<td class="td-title">商品原价</td>'+
	 			       '<td><span >'+product.productOrginPrice+'</span></td>'+
	 		        '</tr>'+
	 		       '<tr>'+
				       '<td class="td-title">商品红包</td>'+
				       '<td><span >'+product.productHongbao+'</span></td>'+
			        '</tr>'+
			        '<tr>'+
				       '<td class="td-title">商品现价</td>'+
				       '<td><span >'+product.productPrice+'</span></td>'+
			        '</tr>'+
    		    '</table>'); 
       }
	   
	   $('#goBack').on('click', backHome);
   });
   
   
   function backHome() {
      window.location.href =  basePath + "${common_url}init";
   }
</script>
</body>
</html>